﻿using Rhyduino;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.IO.Ports;
using BitFactory.Logging;
using System.Collections.Specialized;
using Rhyduino.Message;

namespace Rhyduino.UnitTest
{
    
    
    /// <summary>
    ///This is a test class for ArduinoTest and is intended
    ///to contain all ArduinoTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ArduinoTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for UnknownMessageReceived
        ///</summary>
        [TestMethod()]
        public void UnknownMessageReceivedTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> expected = null; // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> actual;
            target.UnknownMessageReceived = expected;
            actual = target.UnknownMessageReceived;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for SerialPort
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void SerialPortTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            SerialPort expected = null; // TODO: Initialize to an appropriate value
            SerialPort actual;
            target.SerialPort = expected;
            actual = target.SerialPort;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for PortName
        ///</summary>
        [TestMethod()]
        public void PortNameTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            string actual;
            actual = target.PortName;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for MessagePosted
        ///</summary>
        [TestMethod()]
        public void MessagePostedTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> expected = null; // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> actual;
            target.MessagePosted = expected;
            actual = target.MessagePosted;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Logger
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void LoggerTest()
        {
            FileLogger actual;
            actual = Arduino_Accessor.Logger;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for IsConnected
        ///</summary>
        [TestMethod()]
        public void IsConnectedTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.IsConnected;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for FirmataVersionReportReceived
        ///</summary>
        [TestMethod()]
        public void FirmataVersionReportReceivedTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> expected = null; // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> actual;
            target.FirmataVersionReportReceived = expected;
            actual = target.FirmataVersionReportReceived;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for FirmataName
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void FirmataNameTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            target.FirmataName = expected;
            actual = target.FirmataName;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for FirmataMinorVersion
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void FirmataMinorVersionTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            Nullable<int> expected = new Nullable<int>(); // TODO: Initialize to an appropriate value
            Nullable<int> actual;
            target.FirmataMinorVersion = expected;
            actual = target.FirmataMinorVersion;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for FirmataMajorVersion
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void FirmataMajorVersionTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            Nullable<int> expected = new Nullable<int>(); // TODO: Initialize to an appropriate value
            Nullable<int> actual;
            target.FirmataMajorVersion = expected;
            actual = target.FirmataMajorVersion;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for DigitalPortReportReceived
        ///</summary>
        [TestMethod()]
        public void DigitalPortReportReceivedTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> expected = null; // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> actual;
            target.DigitalPortReportReceived = expected;
            actual = target.DigitalPortReportReceived;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for DigitalPinState
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void DigitalPinStateTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            BitVector32 expected = new BitVector32(); // TODO: Initialize to an appropriate value
            BitVector32 actual;
            target.DigitalPinState = expected;
            actual = target.DigitalPinState;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for BaudRate
        ///</summary>
        [TestMethod()]
        public void BaudRateTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            int actual;
            actual = target.BaudRate;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for AnalogPinReportReceived
        ///</summary>
        [TestMethod()]
        public void AnalogPinReportReceivedTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> expected = null; // TODO: Initialize to an appropriate value
            EventHandler<FirmataEventArgs> actual;
            target.AnalogPinReportReceived = expected;
            actual = target.AnalogPinReportReceived;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ProcessSerialData
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void ProcessSerialDataTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            byte[] data = null; // TODO: Initialize to an appropriate value
            target.ProcessSerialData(data);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Post
        ///</summary>
        [TestMethod()]
        public void PostTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            byte[] message = null; // TODO: Initialize to an appropriate value
            target.Post(message);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for OnUnknownMessageReceived
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void OnUnknownMessageReceivedTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            FirmataMessage message = null; // TODO: Initialize to an appropriate value
            target.OnUnknownMessageReceived(message);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for OnFirmataVersionReportReceived
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void OnFirmataVersionReportReceivedTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            FirmataVersionReport message = null; // TODO: Initialize to an appropriate value
            target.OnFirmataVersionReportReceived(message);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for OnDigitalPortReportReceived
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void OnDigitalPortReportReceivedTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            DigitalPortReport message = null; // TODO: Initialize to an appropriate value
            target.OnDigitalPortReportReceived(message);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for OnAnalogPinReportReceived
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void OnAnalogPinReportReceivedTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            AnalogPinReport message = null; // TODO: Initialize to an appropriate value
            target.OnAnalogPinReportReceived(message);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Initialize
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void InitializeTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            string portName = string.Empty; // TODO: Initialize to an appropriate value
            int baudRate = 0; // TODO: Initialize to an appropriate value
            bool autoOpen = false; // TODO: Initialize to an appropriate value
            target.Initialize(portName, baudRate, autoOpen);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetAnalogValue
        ///</summary>
        [TestMethod()]
        public void GetAnalogValueTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            int pinNumber = 0; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.GetAnalogValue(pinNumber);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Finalize
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void FinalizeTest()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            target.Finalize();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Dispose
        ///</summary>
        [TestMethod()]
        public void DisposeTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            target.Dispose();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Dispose
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Rhyduino.dll")]
        public void DisposeTest1()
        {
            Arduino_Accessor target = new Arduino_Accessor(); // TODO: Initialize to an appropriate value
            bool disposing = false; // TODO: Initialize to an appropriate value
            target.Dispose(disposing);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Disconnect
        ///</summary>
        [TestMethod()]
        public void DisconnectTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            target.Disconnect();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Connect
        ///</summary>
        [TestMethod()]
        public void ConnectTest()
        {
            Arduino target = new Arduino(); // TODO: Initialize to an appropriate value
            target.Connect();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Arduino Constructor
        ///</summary>
        [TestMethod()]
        public void ArduinoConstructorTest()
        {
            string portName = string.Empty; // TODO: Initialize to an appropriate value
            Arduino target = new Arduino(portName);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for Arduino Constructor
        ///</summary>
        [TestMethod()]
        public void ArduinoConstructorTest1()
        {
            Arduino target = new Arduino();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for Arduino Constructor
        ///</summary>
        [TestMethod()]
        public void ArduinoConstructorTest2()
        {
            string portName = string.Empty; // TODO: Initialize to an appropriate value
            int baudRate = 0; // TODO: Initialize to an appropriate value
            bool autoOpen = false; // TODO: Initialize to an appropriate value
            Arduino target = new Arduino(portName, baudRate, autoOpen);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for Arduino Constructor
        ///</summary>
        [TestMethod()]
        public void ArduinoConstructorTest3()
        {
            string portName = string.Empty; // TODO: Initialize to an appropriate value
            int baudRate = 0; // TODO: Initialize to an appropriate value
            Arduino target = new Arduino(portName, baudRate);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
    }
}
